<?php get_header(); 
$Parent_cat 		= get_parent_cat_id();
$Parent_catSlug 	= get_cat_slug($Parent_cat);
?>
	<div id="floatswrap" class="clearfix">
		<div id="featured_holder" class="noprint">
			<div class="outer">
				<div class="inner">
					
						<img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/<?php echo get_option('wps_child_theme'); ?>/images/<?php echo $Parent_catSlug;?>.jpg" alt="" />
				
				</div><!-- inner -->
			</div><!-- outer -->
		</div><!-- featured_holder -->
			
		<?php include(TEMPLATEPATH.'/top_sidebar.php');  ?>				
						
		<div id="breadcrumb" class="noprint">
			<?php if(class_exists('bcn_breadcrumb_trail'))
				{
					//Make new breadcrumb object
					$breadcrumb_trail = new bcn_breadcrumb_trail;
					//Setup options here if needed
					$breadcrumb_trail->opt['home_title'] = "Home";
					//Fill the breadcrumb trail
					$breadcrumb_trail->fill();
					//Display the trail
					$breadcrumb_trail->display();
				}
			?>
		</div><!-- breadcrumb -->				
		<div id="main_col" class="clearfix">
			<?php if (have_posts()) : ?>
				<?php while (have_posts()) : the_post(); ?>
				
					<div class="col post_single clearfix">
						<img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/<?php echo get_option('wps_child_theme'); ?>/images/<?php get_custom_field('item_image', TRUE); ?>" width="272" height="342" alt="<?php the_title(); ?>" />
					
						<form class="view_cart" method="post" action="<?php echo $basket_url; ?>" target="_top">
							<div class="shopform_btn">
								<input type="image"  name="submit" src="<?php bloginfo('wpurl'); ?>/wp-content/themes/<?php echo get_option('wps_child_theme'); ?>/images/view_cart.png" />
							</div>
						</form>
							
						<form class="add_to_cart" name="_xclick" action="" method="post">
							<input type="hidden" name="cmd" value="add" />									
							<input type="hidden" name="item_name" value="<?php the_title(); ?>" />									
							<input type="hidden" name="item_id" value="<?php get_custom_field('ID_item', TRUE); ?>"/>
							<input type="hidden" name="item_number" value="1"/>									
							<?php 
								if(get_post_meta($post->ID, 'new_price', true)) { 
									$values = get_post_custom_values("new_price"); 
									$new_price = $values[0]; ?>
									<input type="hidden" name="amount" value="<?php get_custom_field('new_price', TRUE); ?>" />
							<?php } 
								elseif(get_post_meta($post->ID, 'price', true)){ 
									$values 		= get_post_custom_values("price"); 
									$price 	= $values[0];?>
									<input type="hidden" name="amount" value="<?php get_custom_field('price', TRUE); ?>" />
							<?php }	?>									
							<input type="hidden" name="currency_code" value="<?php echo get_option('wps_currency_code'); ?>" />
							<input type="hidden" name="image_thumb" value="<?php get_custom_field('image_thumb', TRUE); ?>" />
							<input type="hidden" name="item_file" value="<?php get_custom_field('item_file', TRUE); ?>" />									
							<input type="hidden" name="add" value="1" />
							<div class="shopform_btn">
								<input type="image" name="add" src="<?php bloginfo('wpurl'); ?>/wp-content/themes/<?php echo get_option('wps_child_theme'); ?>/images/add_to_cart.png" />								
							</div>
						</form>	
					</div><!-- col -->
				
					<div class="double_col">
						<div class="double_col_inner">
							<h2><?php the_title(); ?> <span><?php the_tags('by ',' '); ?></span></h2>
							<?php if(get_post_meta($post->ID, 'new_price', true)) { 
								$values = get_post_custom_values("new_price"); 
								$new_price = $values[0]; ?>
												
									<span class="old_price"><?php get_custom_field('price', TRUE); ?></span>
									<span class="new_price"><?php get_custom_field('new_price', TRUE); ?> <span class="currency"><?php echo get_option('wps_currency_code'); ?></span></span>
								
							<?php } elseif(get_post_meta($post->ID, 'price', true)){ 
								$values 		= get_post_custom_values("price"); 
								$price 	= $values[0];?>
													
								<span class="price"><?php get_custom_field('price', TRUE); ?> <span class="currency"><?php echo get_option('wps_currency_code'); ?></span></span>
							<?php }	?>

							
							<ul class="tabs">
								<li class="widget_overview"><a href="#">Overview</a></li>
								<li class="widget_reviews"><a href="#">Reviews</a></li>
								<li class="widget_write"><a href="#">Write a Review</a></li>
								<li class="widget_other"><a href="#">Listen to a Sample</a></li>
							</ul><!-- tabs -->
						
							<div class="widget_content">
								<div class="widget_overview cont">
									<div>
										<?php the_content(); ?>
									</div>
								</div><!-- widget_overview-->	
								
								<?php comments_template('', true); ?>
								
								<div class="widget_other cont noprint">
									<div class="player_wrap">
										<!-- setup player container --> 
										<a  
											 href="<?php get_custom_field('media', TRUE); ?>"  
											 style="display:block;width:500px;height:300px;margin:0 auto;"  
											 id="player">

											<!-- HTML based splash image --> 
											<img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/<?php echo get_option('wps_child_theme'); ?>/images/player_img.png" alt="Click to play" /> 
											
										</a> 
									
										<!-- this will install flowplayer inside previous A- tag. -->
										<script>
											flowplayer("player", "<?php bloginfo('wpurl'); ?>/wp-content/themes/eGoods/swf/flowplayer-3.0.3.swf");
										</script>
									</div><!-- player_wrap-->
								</div><!-- widget_other -->
								
							</div><!-- widget_content -->
							
						</div><!-- double_col_inner -->
					</div><!-- double_col -->
				<?php endwhile; ?>
				
				<?php include(TEMPLATEPATH.'/single_bottom_sidebar.php');  ?>
				
			<?php else : ?>
				<p>Sorry, no posts matched your criteria.</p>

			<?php endif; ?>
				
		</div><!-- main_col -->
	</div><!-- end floatswrap --> 
<?php get_footer(); ?>